<!DOCTYPE html>
<html lang="en">
<head>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6775988347285724"
     crossorigin="anonymous"></script>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>404 - 页面失踪了！</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: 'Arial', sans-serif;
            background: linear-gradient(135deg, #1e272e, #2c3e50);
            color: #ffffff;
            overflow-x: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            position: relative;
        }
        .container {
            text-align: center;
            z-index: 10;
        }
        .container h1 {
            font-size: 6rem;
            margin: 0;
            animation: glitch 2s infinite;
        }
        .container h2 {
            font-size: 2rem;
            margin: 20px 0;
            animation: fade 2s infinite;
        }
        .container p {
            font-size: 1.2rem;
            margin: 20px 0;
        }
        .button {
            padding: 10px 20px;
            background: #00ff80;
            border: none;
            border-radius: 5px;
            font-size: 1.2rem;
            color: #1e272e;
            cursor: pointer;
            transition: transform 0.3s ease, background 0.3s ease;
        }
        .button:hover {
            background: #00e676;
            transform: scale(1.1);
        }
        @keyframes glitch {
            0%, 100% {
                transform: translate(0, 0);
            }
            25% {
                transform: translate(-5px, -5px);
            }
            50% {
                transform: translate(5px, 5px);
            }
            75% {
                transform: translate(-5px, 5px);
            }
        }
        @keyframes fade {
            0%, 100% {
                opacity: 1;
            }
            50% {
                opacity: 0.5;
            }
        }
        /* 动态背景 */
        .particles {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
        }
    </style>
</head>
<body>
    <canvas class="particles"></canvas>
    <div class="container">
        <h1>404</h1>
        <h2>页面失踪了！</h2>
        <p>抱歉，您访问的页面可能被外星人绑架了……或者链接写错了。</p>
        <p>别担心，我可以带你回到安全的地方。</p>
        <button class="button" onclick="window.location.href='/';">传送我回主页</button>
    </div>
    <script>
        // 粒子效果
        const canvas = document.querySelector('.particles');
        const ctx = canvas.getContext('2d');

        canvas.width = window.innerWidth;
        canvas.height = window.innerHeight;

        window.addEventListener('resize', () => {
            canvas.width = window.innerWidth;
            canvas.height = window.innerHeight;
        });

        const particles = [];

        class Particle {
            constructor(x, y, color) {
                this.x = x;
                this.y = y;
                this.color = color;
                this.size = Math.random() * 3 + 1;
                this.speedX = Math.random() * 2 - 1;
                this.speedY = Math.random() * 2 - 1;
            }

            draw() {
                ctx.fillStyle = this.color;
                ctx.beginPath();
                ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
                ctx.fill();
            }

            update() {
                this.x += this.speedX;
                this.y += this.speedY;

                if (this.x < 0 || this.x > canvas.width) this.speedX *= -1;
                if (this.y < 0 || this.y > canvas.height) this.speedY *= -1;
            }
        }

        function createParticles() {
            for (let i = 0; i < 100; i++) {
                const x = Math.random() * canvas.width;
                const y = Math.random() * canvas.height;
                const color = `hsl(${Math.random() * 360}, 100%, 50%)`;
                particles.push(new Particle(x, y, color));
            }
        }

        createParticles();

        function animate() {
            ctx.clearRect(0, 0, canvas.width, canvas.height);

            particles.forEach(particle => {
                particle.draw();
                particle.update();
            });

            requestAnimationFrame(animate);
        }

        animate();
    </script>
</body>
</html>
